<div>
    <table ng-if="orgInfos" cellpadding="0" cellspacing="0" border="0" class="datatable table table-striped table-bordered table-hover dataTable">
        <thead>
        <tr>
            <th>姓名<input type="checkbox" ng-model="allCheck" ng-click="checkAll(allCheck)"></th>
            <th>头像</th>
            <th>性别</th>
            <th>部门</th>
            <th>职位</th>
            <th>城市</th>
            <th>电话</th>
            <th>Email</th>
            <th>标签</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-if="showRow($index)" ng-repeat="item in orgContactList|orderBy:orderList:reverse|filter:infosFilter">
            <td class="oneIn8" ng-if="!showBase" ng-init="showEditButton=false" ng-mouseenter="showEditButton=true" ng-mouseleave="showEditButton=false">
                <input type="checkbox" ng-model="item.$$checked">
                {{item.baseInfo.name}}
                <button class="btn btn-xs" ng-show="showEditButton" ng-click="editItemDetail(item.id)"><i class="fa fa-edit"></i>详细</button>
            </td>
            <td class="oneIn16" ng-if="!showBase">
                <img ng-src="{{item.baseInfo.photoUrl!=''&&item.baseInfo.photoUrl!=undefined?item.baseInfo.photoUrl:item.baseInfo.gender==0?'assets/img/addressbook/2.jpg':'assets/img/addressbook/1.jpg'}}" height="20px" width="20px">
            </td>
            <td class="oneIn16">{{item.baseInfo.gender===0?'女':item.baseInfo.gender===1?'男':'未知'}}</td>
            <td class="oneIn16">{{item.employeeInfo.department}}</td>
            <td class="oneIn16">{{item.employeeInfo.position}}</td>
            <td class="oneIn8">{{item.baseInfo.addresss[0].city}}</td>
            <td class="oneIn8">{{item.baseInfo.mobileNumberList[0].value}}</td>
            <td class="oneIn8">{{item.baseInfo.emailList[0].value}}</td>
            <td class="oneIn8">
                <button ng-disabled="true" ng-if="allMembershipIdList[m].name" class="btn btn-xs btn-success" ng-repeat="m in item.$$memberships">{{allMembershipIdList[m].name}}</button>
            </td>
        </tr>
        </tbody>
    </table>
    <table ng-if="!orgInfos" cellpadding="0" cellspacing="0" border="0" class="datatable table table-striped table-bordered table-hover dataTable">
        <thead>
        <tr>
            <th class="oneIn5">姓名</th>
            <th class="oneIn5">电话</th>
            <th class="oneIn5">上传该联系人到公司</th>
            <th class="oneIn5">以本地数据为准同步</th>
            <th class="oneIn5">以公司数据为准同步</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="item in userContactList|orderBy:orderList:reverse|filter:infosFilter">
            <td>{{item.baseInfo.name}}</td>
            <td>{{item.baseInfo.mobileNumberList[0].value}}</td>
            <td class="text-center">
                <button ng-click="linkupContact(item)" class="btn btn-xs btn-success" ng-if="!item.linkedOrgContactId">链接到公司</button>
                <button ng-click="breakLinkContact(item)" class="btn btn-xs btn-warning" ng-if="item.linkedOrgContactId">取消链接</button>
            </td>
            <td class="text-center"><button ng-click="linkupContact(item,false)" ng-if="item.linkedOrgContactId" class="btn btn-xs btn-success">同步数据</button></td>
            <td class="text-center"><button ng-click="linkupContact(item,true)" ng-if="item.linkedOrgContactId" class="btn btn-xs btn-success">同步数据</button></td>
        </tr>
        </tbody>
    </table>
</div>